package com.example.test14.DI;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController3 {
    private UserService userService;
    //构造方法注入
    @Autowired
    public void SetUserController3(UserService userService){
        this.userService=userService;
    }
    public void usercontroller3(){
        System.out.println("running usercontroller3");
        userService.userservice();
    }
}
